import ajax from './index'

//红包充值设置列表
export function redPacketPriceSearch(url) {
  return ajax.get('/admin/red_packet/red_packet_price/search?' + url)
}

//新增充值红包金额
export function redPacketPriceCreate(data) {
  return ajax.post('/admin/red_packet/red_packet_price/create', data)
}

//红包充值金额上架
export function redpacketPriceIdUp(id) {
  return ajax.post('/admin/red_packet/red_packet_price/' + id + '/up')
}

//红包充值金额下架
export function redpacketPriceIdDown(id) {
  return ajax.post('/admin/red_packet/red_packet_price/' + id + '/down')
}
//充值红包金额更新
export function redpacketPriceIdUpdate(id, data) {
  return ajax.post('/admin/red_packet/red_packet_price/' + id + '/update', data)
}

//红包充值金额删除
export function redPacketPriceIdDelete(id) {
  return ajax.post('/admin/red_packet/red_packet_price/' + id + '/delete')
}

//折扣设置
export function redpacketRebateCreate(data) {
  return ajax.post('/admin/red_packet/red_packet_rebate/create', data)
}

//折扣设置列表
export function redPacketRebateList() {
  return ajax.get('/admin/red_packet/red_packet_rebate/list')
}

//红包充值记录
export function redpacketSerchordertype(url) {
  return ajax.get('/admin/order/search?order_type=50' + url)
}
